home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk63 / back202 / backup.doc < prev    next >
Text File  |  1995-03-19  |  13KB  |  334 lines

  1.      
  2.                    BACKUP.DOC
  3.      
  4.                  V2.02
  5.      
  6.                 16 October 1988
  7.      (c)Copyright 1988, Matthew Dillon, All Rights Reserved
  8.            Freely Distributable for non-profit only
  9.      
  10.      
  11.                   (I)
  12.                 OVERVIEW
  13.      
  14.     Backup and Restore (same executable, just renamed) allow you to backup
  15.     any directory tree with optional compression, and later extract all
  16.     or part of the tree.  The protection, date, and file comment is saved
  17.     with each file.
  18.      
  19.     SEE SECTION (6), FLOPICAL BACKUP, for options pertaining to backing
  20.     up directly to floppies.
  21.      
  22.     LIMITATIONS:    When using -c (compress), the entire result of the
  23.     compressed file must fit into memory.  Any files (after compression,
  24.     if any) larger than a floppy when backing up to floppies cannot be
  25.     handled yet.
  26.      
  27.      
  28.                   (I)
  29.                   INSTALLATION
  30.      
  31.     Copy the (1) executable to your C: directory twice, naming one
  32.     'Backup' and the other 'Restore'.  The program looks at the first
  33.     character of its name to determine whether the default is to backup
  34.     or restore.  If you don't have the space, all is not lost ... you
  35.     simply need to specify backup or restore explicitly with the options
  36.     (-b or -r).
  37.      
  38.                    (2)
  39.                  EXOTIC FEATURES
  40.      
  41.     Backup does not write directory trees which contain no files.  Thus,
  42.     when doing incremental backups on a large hard disk, the structure of
  43.     directory sub-trees which have no new files in them will not be
  44.     written.  So if you only modified a couple of files since the last
  45.     backup, there won't be 50K of structure-overhead.
  46.      
  47.     You can specify compression (-c) in the backup.  All files are
  48.     compressed (there must be enough RAM to hold the largest file in
  49.     its compressed state).  Those files which would turn out larger after
  50.     compression than before are NOT compressed.  Certain file suffixes
  51.     cause the compression attempt to be skipped entire:  .Z, .ARC, and .ZOO
  52.     files
  53.      
  54.       IT IS SUGGESTED YOU USE THE COMPRESSION FEATURE EVEN THOUGH IT
  55.       SLOWS DOWN THE BACKUP.  The resulting backup file will be
  56.       significantly reduced in size.  Even though a full backup will
  57.       take a long time, you only do that every once in a while and
  58.       as incremental backups are shorter, they take much less time.
  59.      
  60.     'Pick' patterns are supported (backup only paths which match the
  61.     specified patterns), and 'Discard' patterns are supported (do not backup
  62.     paths which match the specified patterns).    Discard patterns override
  63.     Pick patterns.
  64.      
  65.                   (3)
  66.                 OPTIONS
  67.      
  68.     Here is a list of Backup/Restore options.
  69.      
  70.     -A    ARCHIVE. (Backup) Causes the archive bit to be cleared
  71.         on files being backed up.  (Protection bit -> 1)
  72.      
  73.         (Restore):  If specified, the archive bit is cleared on
  74.         restored files.  Otherwise the archive bit will be set,
  75.         causing the files to be backed up again on the next
  76.         incremental backup.
  77.      
  78.     -U    UPDATE.  (Backup) Restricts the backup to only those files
  79.         which have the archive bit set.  (Protection bit == 0)
  80.      
  81.     -b    BACKUP    (this is the default if the first character in
  82.         the executable is a 'b')
  83.      
  84.     -r    RESTORE (this is the default if the first character in
  85.         the executable is an 'r')
  86.      
  87.     -a    APPEND (Backup)     Cause the backup to be appended to
  88.         the specified (-o) file rather than overwriting it.  Useful
  89.         for incremental backups.
  90.      
  91.     -c    COMPRESS (Backup)   Cause all files to be compressed, if
  92.         possible.  Restore automatically decompresses files which
  93.         have been compressed.  This is the same algorithm used
  94.         in the UNIX compress command.
  95.      
  96.         NO COMPRESSION WILL EVEN BE ATTEMPED ON FILES WITH THE
  97.         FOLLOWING SUFFIXES: .Z .ARC .ZOO
  98.      
  99.     -f[#kb] Turn on backup fragmentation and specify the fragment size,
  100.         default 800K (for backing up to floppies).  NOTE: Currently,
  101.         files larger than the fragment size cannot be backed up!
  102.      
  103.         Note: a suffix is added to the file name w/ a sequence
  104.         number, but each fragment is a complete backup file unto
  105.         itself and may be restored out of order.
  106.      
  107.         Any numerical value specified is in K, i.e. -f800 == 800K
  108.      
  109.     -Fvol:    Add the volume (df0:, df1:, etc..) to the drive sequencing
  110.         list.  The idea is to specify several -F options which are
  111.         cycled through and prefix each fragment.  This also
  112.         enables prompting... the program prompts whenever it
  113.         switches to the next fragment.
  114.      
  115.         If -F is not specified at all and -f is, no prompting
  116.         occurs.
  117.      
  118.     -s    Only display directories as we go along
  119.      
  120.     -S    Silent... don't display files or directories
  121.      
  122.     -v    Verbose... display those files which will NOT be backed
  123.         up as well as those that will.
  124.      
  125.     -l/-t    (both do the same thing).  (Restore)   LIST the archive
  126.         only, do not do an actual restore.
  127.      
  128.     -T    (Restore)   Restore ONLY the timestamp, comment, and
  129.         protection fields.  This is incredibly useful to
  130.         restore timestamp information to files that already
  131.         exist.    NO files are overwritten or created on the
  132.         destination volume(s).
  133.      
  134.     -n#    (Backup)    Sets the output buffer size, in KILOBYTES.
  135.         Default is 64.
  136.      
  137.     -pPAT    (Backup)    Restrict the backup to files which match the
  138.         specified pattern.  Up to 32 patterns may be specified.
  139.      
  140.         (Restore)   Extract only those files which match the
  141.         specified pattern.
  142.      
  143.         NOTE:  The pattern is matched with the COMPLETE PATH as
  144.         shown in the -t option.  '*' and '?' wildcarding is supported
  145.      
  146.     -dPAT    (Backup)    Do not backup files which match the specified
  147.         pattern.   Up to 32 patterns may be specified.
  148.      
  149.         (Restore)   Do not extract files which match the specified
  150.         pattern.
  151.      
  152.         NOTE: The pattern is matched with the COMPLETE PATH as
  153.         shown in the -t option.  '*' and '?' wildcarding is supported.
  154.      
  155.     -oFILE    (Backup)    Specify the OUTPUT FILE for a backup.  IF NO
  156.         OUTPUT FILE IS SPECIFIED, NO OUTPUT FILE IS CREATED.  I.E.
  157.         you can take a second pass just to clear the archive bit.
  158.      
  159.         (Restore)   Specify the directory to place the restored
  160.         directory tree.  (This overrides the volume the backup
  161.         was saved from).  If no directory specified, the original
  162.         volume used in the backup will be restored to.    If no
  163.         volume was specified in the backup but rather a relative
  164.         path was, the restore will be relative to the current
  165.         directory.
  166.      
  167.                   (4)
  168.               STANDARD METHOD OF BACKING UP
  169.      
  170.     Note that with combinations of -o, -A, and -U, you have many choices
  171.     available to you when backing up files.  For hard disks, backups are
  172.     normally done in two phases:
  173.      
  174.     -Once a month do a complete backup of your hard disk
  175.     -Every day do a much smaller 'incremental' backup which backs
  176.      up only those files which have been modified/created since the
  177.      last backup.
  178.      
  179.     The master backup, plus the N incremental backups together
  180.     reconstruct your disk up to the moment.  After a while the
  181.     number of incremental backups will be so great (and messy),
  182.     that you will want to do another complete backup and start
  183.     again.
  184.      
  185.     IN THIS WAY, the COMPRESS option can be put to good use.  The
  186.     incremental backups are usually small, and can be compressed
  187.     relatively quickly.  The complete backup should also be compressed
  188.     (-c in case you forgot) though this will take a much longer time...
  189.     but then again the complete backup is not done every day.
  190.      
  191.     UPDATING THE ARCHIVE BIT ON THE FLY VERSES TAKING A SECOND PASS.
  192.     Updating the archive bit involves writing to the disk.  For complete
  193.     safety you probably do NOT want to update the archive bit while you
  194.     are backing up the files in question.  The following two-pass method
  195.     works well:
  196.      
  197.         (COMPLETE BACKUP)
  198.      
  199.     backup    -c -d"*.o" volume: -ooutput
  200.     backup    -A volume:
  201.      
  202.         (INCREMENTAL BACKUP)
  203.      
  204.     backup -U -c -d"*.o" volume: -ooutput
  205.     backup -A volume:
  206.      
  207.     The -d option is saying "Don't backup all those object modules I left
  208.     laying around".
  209.      
  210.     The first command backs up only those files which have be modified
  211.     or created but does NOT update the archive bit.  The second command
  212.     updates the archive bit without doing anything else (no output file
  213.     is specified and thus none is created).  The second command goes
  214.     extremely quickly since files are not actually read.
  215.      
  216.     For your INCREMENTAL backups, risking modifying the archive bit while
  217.     backing the files up is feasible,  Since very few files will be
  218.     backed up (comparitively):
  219.      
  220.     backup -a -UA -c -d"*.o" volume: -ooutput
  221.      
  222.     In this case I use the -a option (append).  You might NOT want to do
  223.     this and save the incremental backups as separate files.
  224.      
  225.      
  226.                   (5)
  227.               STANDARD METHOD OF RESTORING
  228.      
  229.     Restoring a backup to the original volume: (Restore or Backup -r)
  230.      
  231.     NOTE:  If the -A option is specified, restored files will have
  232.     their Archive bit cleared.    If -A is NOT specified, files will have
  233.     their archive bit set and will thus be re-backed up on the next
  234.     incremental backup.
  235.      
  236.     NOTE:  When restoring files, remember that the incremental backups
  237.     will have the newest modifications and should be specified LAST:
  238.      
  239.     Restore completebkfile incr1 incr2 incr3....
  240.      
  241.     Partial Restore using -p:
  242.      
  243.     Restore -pstuffIWant bkfile1 bkfile2 bkfile3...
  244.      
  245.     ARCHIVE LISTING:
  246.      
  247.     Restore -t bkfile1 bkfile2....
  248.      
  249.     NOTE:    Two 'sizes' are given in the listing.  The first
  250.     is the # bytes the file takes up in the archive, the
  251.     second is the actual size of the file.
  252.      
  253.      
  254.                   (6)
  255.               FLOPICAL BACKUP AND RESTORE
  256.      
  257.     There are two problems associated with floppy backup and restore:
  258.      
  259.     (1) A single file on the HD may be two big for a single floppy
  260.     (2) It may take a lot of floppies to backup an HD
  261.      
  262.     Additionaly, one wants the following conveniences:
  263.      
  264.     (1) Be able to backup to a logical progression of (floppy) drives,
  265.     inserted blank disks in while the system is working on other
  266.     drives.
  267.      
  268.     (2) Be able to restore the same way
  269.      
  270.     (3) If one or more floppies is destroyed be able to restore from the
  271.     remaining floppies.
  272.      
  273.         Currently, you can specify which devices to cycle through
  274.         with the -F option (-Fdf0: -Fdf1: -Fdf2:), but BACKUP will
  275.         always prompt you before continuing.  Since it uses the
  276.         console device, you can specify the yes response as many
  277.         times as you have floppies in ready drives.
  278.      
  279.         Currently, files larger than the specified -f size (800K
  280.         default) cannot be handled if using -f/-F ... However, by
  281.         enabling compression larger files can still fit.
  282.      
  283.         Currently, the entire compressed result of a file must be
  284.         able to fit into memory during the backup.
  285.      
  286.      
  287.                    ***
  288.      
  289.     BACKUP.    Specify the -f option and then -Fvol: for each floppy
  290.     drive (in the order you want) to backup to.  Example:
  291.      
  292.     -f -Fdf0: -Fdf1:
  293.      
  294.     (Also keep in mind all the options listed in sections (3), (4), & (5))
  295.     Currently, you must have PRE-FORMATTED all your backup disks since the
  296.     backup/restore works through normal files.    The system will prompt for
  297.     readyness every time it completes a section.
  298.      
  299.     The backup process never deletes files, only creates or overwrites
  300.     them.  Thus, accidently sticking in a non-blank or incorrect backup
  301.     disk will probably result in a disk-full requester.... not Fatal, though
  302.     inconvenient.
  303.      
  304.     You must still specify the -o option to name the output file, which will
  305.     be prefixed with the next -F volume in sequence and suffixed with the
  306.     sequence number. (.nn)  The disk labels for your floppies may all be
  307.     the same.
  308.      
  309.     EXAMPLE:
  310.      
  311.     backup    -c -d"*.o" -f -Fdf0: -Fdf1: -Fdf2: volume: -oxxbak
  312.     backup    -A volume:
  313.      
  314.     NOTE:    You do NOT specifiy a volume prefix in the -o option ..
  315.     those specified by -F are automatically cycled through as the
  316.     prefix.
  317.      
  318.     * If your hard disk has enough space on it I suggest you backup to an
  319.       alternate partition using only -f (not -F which forces user prompts),
  320.       then copy the chunks to floppies after the entire backup has
  321.       completed.
  322.      
  323.                    ***
  324.      
  325.     RESTORE.    Restore works the same way.  EACH DISK IS INDEPENDANT!    You
  326.     may insert disks in any order to be restored.  Simply execute the
  327.     standard restore command in section (5) for each floppy.
  328.      
  329.     Destroyed disks may be skipped.  Currently, no support for partially
  330.     restored disks exists... i.e. the archive has be clean.
  331.      
  332.      
  333.      
  334.